]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowManager: Update animation of attached modals
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 3 Jul 2012 20:50:25 +0000 (22:50 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 14 Jul 2012 01:33:56 +0000 (03:33 +0200)
With modal dialogs no longer being attached to their parents'
titlebar, the current animation no longer works too well. Use
a simple fade animation instead.

https://bugzilla.gnome.org/show_bug.cgi?id=674499

js/ui/windowManager.js

index 59aa1f3ce0a6a4f6ce88762440f29b293e14f405..eaecb9f559d65cd64dc4e35cd78ccf9b69450379 100644 (file)
@@ -321,28 +321,12 @@ const WindowManager = new Lang.Class({
         }));
         if (actor.meta_window.is_attached_dialog()) {
             this._checkDimming(actor.get_meta_window().get_transient_for());
-            if (this._shouldAnimate()) {
-                actor.set_scale(1.0, 0.0);
-                actor.show();
-                this._mapping.push(actor);
-
-                Tweener.addTween(actor,
-                                 { scale_y: 1,
-                                   time: WINDOW_ANIMATION_TIME,
-                                   transition: "easeOutQuad",
-                                   onComplete: this._mapWindowDone,
-                                   onCompleteScope: this,
-                                   onCompleteParams: [shellwm, actor],
-                                   onOverwrite: this._mapWindowOverwrite,
-                                   onOverwriteScope: this,
-                                   onOverwriteParams: [shellwm, actor]
-                                 });
+
+            if (!this._shouldAnimate()) {
+                shellwm.completed_map(actor);
                 return;
             }
-            shellwm.completed_map(actor);
-            return;
-        }
-        if (!this._shouldAnimateActor(actor)) {
+        } else if (!this._shouldAnimateActor(actor)) {
             shellwm.completed_map(actor);
             return;
         }
@@ -398,7 +382,7 @@ const WindowManager = new Lang.Class({
                 return;
             }
 
-            actor.set_scale(1.0, 1.0);
+            actor.opacity = 255;
             actor.show();
             this._destroying.push(actor);
 
@@ -408,7 +392,7 @@ const WindowManager = new Lang.Class({
             }));
 
             Tweener.addTween(actor,
-                             { scale_y: 0,
+                             { opacity: 0,
                                time: WINDOW_ANIMATION_TIME,
                                transition: "easeOutQuad",
                                onComplete: this._destroyWindowDone,